#!/usr/bin/env python
import sys

channel = "Local/"+sys.argv[1]+"@"+sys.argv[2]
extension=sys.argv[3]
context=sys.argv[4]
cf = open("/var/spool/asterisk/outgoing/"+sys.argv[1]+".call",'w+')
cf.write("Channel:"+channel+"\nMaxRetries:2\nRetryTime:10\nWaitTime:20\ncontext:"+context+"\nextension:"+extension+"\npriority:1\n")